﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using JTicket.BLL;

namespace JTicket.UI
{
    public partial class JT_Area : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Bind();
        }
        public string Bind()
        {
            StringBuilder sb = new StringBuilder();
            if (Request.QueryString["Titlecode"] != null && Request.QueryString["ThCode"] != null)
            {
                var x = BLL.D_Area.GetList(Request.QueryString["ThCode"].ToString());
                foreach (var model in x)
                {
                    sb.Append("<a  href=\"javascript:window.parent.mF.location.href='S_SaleTicket.aspx?Titlecode="
                        + Request.QueryString["Titlecode"].ToString()
                        + "&SubCode=" + model.AreaCode + "&ThCode=" + model.ThCode
                        + "';\" target='mainFrame' onclick=\"window.close();\"  >");
                    sb.Append("<div style=\"width: 150px; height: 60px; float:left; border-color:Green; border-style:solid; cursor:hand; margin-left:10px; margin-bottom:10px;\" onmouseover=\"this.style.background='#6591BE';\"  onmouseout=\"this.style.background='#f9f9f9';\">");
                    sb.Append("<div style=\"margin-top:25px; color:Red; font-size:15px; font-weight:bold\">" + model.AreaName + "</div>");
                    sb.Append("</div>");
                    sb.Append("</a> ");
                }
            }
            return sb.ToString();
        }
    }
}